home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Mac Game Programming Gurus / TricksOfTheMacGameProgrammingGurus.iso / More Source / C⁄C++ / Xconq 7.0d37 / source / misc / per2game < prev    next >
Encoding:
Text File  |  1994-02-08  |  2.2 KB  |  70 lines  |  [TEXT/R*ch]

  1. #!/bin/sh
  2.  
  3. # A shell script that does a partial conversion of 5.x period files
  4. # into 7.x game files.
  5.  
  6. sed -f per.sed.first $1 >$1.tmp1
  7.  
  8. # Translate global variables into their modern equivalents.
  9.  
  10. rm -r tmp.sed
  11. touch tmp.sed
  12. xform-var edge-terrain edge-terrain >>tmp.sed
  13. xform-var country-size country-radius-min >>tmp.sed
  14. xform-var country-min-distance country-separation-min >>tmp.sed
  15. xform-var country-max-distance country-separation-max >>tmp.sed
  16. xform-var all-seen see-all >>tmp.sed
  17. sed -f tmp.sed $1.tmp1 >$1.tmp2
  18.  
  19. # Transform unit properties into their modern equivalents.
  20.  
  21. rm -r tmp.sed
  22. touch tmp.sed
  23. xform-prop always-seen see-always >>tmp.sed
  24. xform-prop hold-volume capacity >>tmp.sed
  25. xform-prop hp hp-max >>tmp.sed
  26. xform-prop in-country start-with >>tmp.sed
  27. xform-prop max-alt alt-percentile-max >>tmp.sed
  28. xform-prop min-alt alt-percentile-min >>tmp.sed
  29. xform-prop max-wet wet-percentile-max >>tmp.sed
  30. xform-prop min-wet wet-percentile-min >>tmp.sed
  31. xform-prop neutral can-be-independent >>tmp.sed
  32. xform-prop revolt revolt-chance >>tmp.sed
  33. xform-prop see-range vision-range >>tmp.sed
  34. xform-prop territory point-value >>tmp.sed
  35. sed -f tmp.sed $1.tmp2 >$1.tmp3
  36.  
  37. # Transform tables into their modern equivalents.
  38.  
  39. rm -r tmp.sed
  40. touch tmp.sed
  41. xform-table alter-mobility mp-per-occupant >>tmp.sed
  42. xform-table attrition attrition >>tmp.sed
  43. xform-table capture capture-chance >>tmp.sed
  44. xform-table consume base-consumption >>tmp.sed
  45. xform-table damage damage >>tmp.sed
  46. xform-table disaster accident-vanish-chance >>tmp.sed
  47. xform-table favored favored-terrain >>tmp.sed
  48. xform-table guard hp-to-garrison >>tmp.sed
  49. xform-table hit hit-chance >>tmp.sed
  50. xform-table hit-by hit-by >>tmp.sed
  51. xform-table hits-with hits-with >>tmp.sed
  52. xform-table in-length in-length >>tmp.sed
  53. xform-table out-length out-length >>tmp.sed
  54. xform-table produce base-production >>tmp.sed
  55. xform-table productivity productivity >>tmp.sed
  56. xform-table storage storage-x >>tmp.sed
  57. xform-table to-move consumption-per-move >>tmp.sed
  58. sed -f tmp.sed $1.tmp3 >$1.tmp4
  59.  
  60. # var-to-uprop known-radius initial-seen-radius >>tmp.sed
  61. # uprop-to-table surrender surrender-chance >>tmp.sed
  62. # uprop-to-table visibility visibility >>tmp.sed
  63.  
  64. sed -f per.sed.last $1.tmp4
  65.  
  66. #rm -f tmp.sed $1.tmp*
  67.  
  68.  
  69.  
  70.